export default {
  namespaced: true,

  state: {
    user: {

    },
    token: ''
  },
  mutations: {
    SET_USER (state, data) {
      state.user = data
    },
    SET_TOKEN (state, data) {
      state.token = data
    },
    REMOVE_USER (state, data) {
      state.user = {}
    },
    REMOVE_TOKEN (state, data) {
      state.token = ''
    }
  },
  actions: {
    setUser ({ commit }, data) {
      commit('SET_USER', data)
    },
    setToken ({ commit }, data) {
      commit('SET_TOKEN', data)
    },
    removeUser ({ commit }) {
      commit('REMOVE_USER')
    },
    removeToken ({ commit }) {
      commit('REMOVE_TOKEN')
    }
  }

}
